package cn.afei.cloud.utils;

import java.io.Serializable;

public class QueryPage implements Serializable {
    private static final long serialVersionUID = 1L;
    /**
     * 当前页码
     */
    private int currentPage = 1;
    /**
     * 每页显示记录数
     */
    private int pageSize = 10;
    /**
     * 排序字段
     */
    private String sidx;


    private boolean isAsc;

    public QueryPage() {
        super();
    }

    public QueryPage(int currentPage, int pageSize) {
        this.currentPage = currentPage;
        this.pageSize = pageSize;
    }

    public QueryPage(int currentPage, int pageSize, String sidx) {
        this.currentPage = currentPage;
        this.pageSize = pageSize;
        this.sidx = sidx;
        this.isAsc = false;

    }

    public QueryPage(int currentPage, int pageSize, String sidx, boolean isAsc) {
        this.currentPage = currentPage;
        this.pageSize = pageSize;
        this.sidx = sidx;
        this.isAsc = isAsc;
    }

    public int getCurrentPage() {
        return currentPage;
    }

    public void setCurrentPage(int currentPage) {
        this.currentPage = currentPage;
    }

    public int getPageSize() {
        return pageSize;
    }

    public void setPageSize(int pageSize) {
        this.pageSize = pageSize;
    }

    public String getSidx() {
        return sidx;
    }

    public void setSidx(String sidx) {
        this.sidx = sidx;
    }

    public boolean isAsc() {
        return isAsc;
    }

    public void setAsc(boolean asc) {
        isAsc = asc;
    }
}
